<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="Generator" content="JDoc®">
    <meta name="Author" content="JDoc-jxtpro">
    <meta name="Keywords" content="JDoc">
    <meta name="Description" content="JDoc">
    <title>JDoc</title>
    <link rel="stylesheet" href="layui/css/layui.css">
</head>

<body>
    <blockquote class="layui-elem-quote">
    	<button class="layui-btn" onclick="saveOrUpdate()" >
		  <i class="layui-icon">&#xe608;</i> 添加
		</button>
		<button class="layui-btn layui-btn-danger">
		  <i class="layui-icon">&#xe640;</i> 删除
		</button>
    	
		<hr />
		<table class="layui-table" lay-skin="row">
		  <thead>
		  	<th><input type="checkbox"></th>
		  	<th>接口地址</th><th>接口描述</th><th>操作</th>
		  </thead>
		  
		  <tbody>
		  	<tr>
		  		<td><input type="checkbox" checked></td>	
		  		<td>/api/jdoc/list</td>
		  		<td>测试开发组,请勿删除</td>
		  		<td>
		  			<button onclick="apiDetail('1')" class="layui-btn layui-btn-xs">
		  				<i class="layui-icon">&#xe638;</i>测试
		  			</button>
		  			<button onclick="saveOrUpdate()" class="layui-btn layui-btn-small layui-btn-normal">
		  				<i class="layui-icon">&#xe642;</i>编辑
		  			</button>
		  			<button onclick="del('1')" class="layui-btn layui-btn-small layui-btn-danger">
						  <i class="layui-icon">&#xe640;</i> 删除
						</button>
		  		</td>
		  	</tr>
		  	<tr>
		  		<td><input type="checkbox" checked></td>	
		  		<td>/api/jdoc/list</td>
		  		<td>测试开发组,请勿删除</td>
		  		<td>
		  			<button onclick="apiDetail('1')" class="layui-btn layui-btn-xs">
		  				<i class="layui-icon">&#xe638;</i>测试
		  			</button>
			  		<button onclick="saveOrUpdate()" class="layui-btn layui-btn-small layui-btn-normal">
		  				<i class="layui-icon">&#xe642;</i>编辑
		  			</button>
			  		<button onclick="del('1')" class="layui-btn layui-btn-small layui-btn-danger">
						  <i class="layui-icon">&#xe640;</i> 删除
						</button>
		  		</td>
		  		
		  	</tr>
		  	<tr>
		  		<td><input type="checkbox" checked></td>	
		  		<td>/api/jdoc/list</td>
		  		<td>测试开发组,请勿删除</td>
		  		<td>
		  			<button onclick="apiDetail('1')" class="layui-btn layui-btn-xs">
		  				<i class="layui-icon">&#xe638;</i>测试
		  			</button>
			  		<button onclick="saveOrUpdate()" class="layui-btn layui-btn-small layui-btn-normal">
		  				<i class="layui-icon">&#xe642;</i>编辑
		  			</button>
			  		<button onclick="del('1')" class="layui-btn layui-btn-small layui-btn-danger">
					  <i class="layui-icon">&#xe640;</i> 删除
					</button>
		  		</td>
		  	</tr>
		  </tbody>
		</table>
    </blockquote>
    <script type="text/javascript" src="layui/layui.js"></script>
    <script type="text/javascript">
        /**
         * 对layui进行全局配置
         */
        layui.config({
            base: 'js/'
        });
	  
        //新增或删除
        function saveOrUpdate(){
        	layui.use('layer', function(){
			  var layer = layui.layer;
			  
			  layer.open({
			  	  area: ['700px', '350px'],
			  	  maxmin:true,
				  type: 2, 
				  content: 'api-form.html'
			  }); 
			});   
        }
        //测试
        function apiDetail(id){
       	 	layui.use('layer', function(){
			  var layer = layui.layer;
			  
			  layer.open({
			  	  area: ['720px', '450px'],
			  	  maxmin:true,
				  type: 2, 
				  content: 'api_detail.html'
			  }); 
			});              
        };
        //删除
        function del(id){
        	
        		layui.use('layer', function(){
			  var layer = layui.layer;
			  
			  layer.confirm('是否删除', {icon: 3, title:'请确认'}, function(index){
				  layer.close(index);
			  });
			});  
        };
    </script>
</body>
</html>